#!/bin/sh
# setup enviroment for make

GIT_REVISION=$(git rev-parse HEAD)
GIT_REVSHORT=$(echo ${GIT_REVISION} | cut -b 1-12)
PKG_VERSION=$(grep "VERSION = " ../src/__init__.py | cut -d\' -f2)
PKG_RELEASE=$(grep 'pkgrel=' pkgbuild.sh | cut -d\' -f2)

mkdir -p work

cat << EOF
export PKG_VERSION:=${PKG_VERSION}
export PKG_RELEASE:=${PKG_RELEASE}
export GIT_REVISION:=${GIT_REVISION}
export GIT_REVSHORT:=${GIT_REVSHORT}
EOF
